package com.itzdm.mapper;

import com.itzdm.pojo.Admin;
import com.itzdm.pojo.Car;
import org.apache.ibatis.annotations.*;

@Mapper
public interface AdminMapper {
    @Insert("insert into car(type, brand, model, vehicle_license, per_rent) VALUES (#{type},#{brand},#{model},#{vehicleLicense},#{perRent})")
    void addVehicle(Car car);

    @Delete(("delete from car where vehicle_id = #{vehicleId}"))
    void deleteVehicle(Car car);
    void updateVehicle(Car car);

    @Select("select count(*)from admin where username = #{username}")
    int isExit(String username);

    @Select("select pwd from admin where username = #{username}")
    String getPwd(String username);
}
